package com.feicheng.iou.mapper;

import com.feicheng.iou.entity.ReservationInterview;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feicheng.iou.pojo.statisticsInfoPOJO.ReservationBackviewAndNamePOJO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tianchunlei
 * @since 2021-06-28
 */
public interface ReservationInterviewMapper extends BaseMapper<ReservationInterview> {

    /**
     * @Author wuweinan
     * @Description  查询出对应用户的预约接待总条数
     * @Date 2021-8-9 17:19
     * @param searchStartTime,searchEndTime,autorId
     * @return Integer
     */
    Integer statisticsReservationInterviewCount(@Param("searchStartTime") LocalDateTime searchStartTime,
                                                @Param("searchEndTime") LocalDateTime searchEndTime,
                                                @Param("autorId") Integer autorId);


    /**
     * @Author wuweinan
     * @Description  统计今日待到访
     * @Date 2021-8-9 17:19
     * @param searchStartTime,searchEndTime,autorId
     * @return Integer
     */
    Integer statisticstoDayUnHandleInterview(@Param("searchStartTime") LocalDateTime searchStartTime,
                                             @Param("searchEndTime") LocalDateTime searchEndTime,
                                             @Param("autorId") Integer autorId);



    /**
     * @Author wuweinan
     * @Description  统计今日预约到访的学生IdList
     * @Date 2021-8-9 17:19
     * @param todayStart:不给值默认是当日零时,todayEnd:不给值为当日凌晨
     * @return  List<Integer>
     */
    List<Integer> statisticsUnHandleInterviewStudentIdList(@Param("todayStart") LocalDateTime todayStart,
                                                           @Param("todayEnd") LocalDateTime todayEnd,
                                                           @Param("autorId") Integer autorId);


    /**
     * @Author wuweinan
     * @Description  统计今日到访的学生IdList
     * @Date 2021-8-9 17:19
     * @param todayStart:不给值默认是当日零时,todayEnd:不给值为当日凌晨
     * @return  List<Integer>
     */
    List<Integer> statisticsInterviewStudentIdList(@Param("todayStart") LocalDateTime todayStart,
                                                   @Param("todayEnd") LocalDateTime todayEnd,
                                                   @Param("autorId") Integer autorId );

    /**
     * @Author wuweinan
     * @Description  求差集,今日待到访
     * @Date 2021-8-9 17:19
     * @param
     * @return  List<Integer>
     */
    List<ReservationBackviewAndNamePOJO> statisticsTodayUnHandleInterviewList(
                                                                              @Param("page") Integer page,
                                                                              @Param("size") Integer size,
                                                                              @Param("todayStart") LocalDateTime toDayStart,
                                                                              @Param("todayEnd") LocalDateTime toDayEnd,
                                                                              @Param("studentIdSet") Set<Integer> studentIdSet,
                                                                              @Param("autorId") Integer autorId);

    /**
     * @Author wuweinan
     * @Description  求差集,今日待到访数量
     * @Date 2021-8-9 17:19
     * @param
     * @return  Integer
     */
    Integer  statisticsTodayUnHandleInterviewCount(@Param("todayStart") LocalDateTime toDayStart,
                                                  @Param("todayEnd") LocalDateTime toDayEnd,
                                                  @Param("studentIdSet") Set<Integer> studentIdSet,
                                                  @Param("autorId") Integer autorId);





    /**
     * @Author wuweinan
     * @Description  所有人的预约到访差集回访默认今日
     * @Date 2021-8-9 17:19
     * @param
     * @return autorId
     */
    List<ReservationBackviewAndNamePOJO> statisticsAllTodayUnHandleInterviewList(
                                                            @Param("page") Integer page,
                                                            @Param("size") Integer size,
                                                            @Param("autorIdList") List<Integer> autorIdList,
                                                            @Param("studentIdSetList") List<List<Integer>>  studentIdSetList);


    /**
     * @Author wuweinan
     * @Description  所有人的预约到访差集回访默认今日数量
     * @Date 2021-8-9 17:19
     * @param
     * @return autorId
     */
    Integer statisticsAllTodayUnHandleInterviewCount(@Param("autorIdList") List<Integer> autorIdList,
                                                     @Param("studentIdSetList") List<List<Integer>>  studentIdSetList);






















}
